package com.dianping.cat.home.dal.report;

import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class MetricGraphDao
  extends AbstractDao {
/* 10 */   public MetricGraph createLocal() { return new MetricGraph(); }





/* 16 */   public int deleteByPK(MetricGraph proto) throws DalException { return getQueryEngine().deleteSingle(MetricGraphEntity.DELETE_BY_PK, proto); }





/* 22 */   public int deleteBeforeDate(MetricGraph proto) throws DalException { return getQueryEngine().deleteSingle(MetricGraphEntity.DELETE_BEFORE_DATE, proto); }




  public MetricGraph findByPK(int keyId, Readset<MetricGraph> readset) throws DalException {
/* 28 */     MetricGraph proto = new MetricGraph();

/* 30 */     proto.setKeyId(keyId);

/* 32 */     return (MetricGraph)getQueryEngine().querySingle(MetricGraphEntity.FIND_BY_PK, proto, readset);
  }






  public MetricGraph findByGrapId(long graphId, Readset<MetricGraph> readset) throws DalException {
/* 41 */     MetricGraph proto = new MetricGraph();

/* 43 */     proto.setGraphId(graphId);

/* 45 */     return (MetricGraph)getQueryEngine().querySingle(MetricGraphEntity.FIND_BY_GRAP_ID, proto, readset);
  }






  public MetricGraph findLast(int number, Readset<MetricGraph> readset) throws DalException {
/* 54 */     MetricGraph proto = new MetricGraph();

/* 56 */     proto.setNumber(number);

/* 58 */     return (MetricGraph)getQueryEngine().querySingle(MetricGraphEntity.FIND_LAST, proto, readset);
  }








/* 68 */   protected Class<?>[] getEntityClasses() { return new Class[] { MetricGraphEntity.class }; }



/* 72 */   public int insert(MetricGraph proto) throws DalException { return getQueryEngine().insertSingle(MetricGraphEntity.INSERT, proto); }





/* 78 */   public int updateByPK(MetricGraph proto, Updateset<MetricGraph> updateset) throws DalException { return getQueryEngine().updateSingle(MetricGraphEntity.UPDATE_BY_PK, proto, updateset); }
}


/* Location:              /Users/hanfei/Documents/apache-tomcat-9.0.24/webapps/cat/WEB-INF/classes/!/com/dianping/cat/home/dal/report/MetricGraphDao.class
 * Java compiler version: 7 (51.0)
 * JD-Core Version:       1.0.7
 */